"""
重写父类方法和属性
    子类重写父类方法和属性之后，以子类的方法和属性为准
"""
class Master():
    def __init__(self):
        self.kongfu = ['古法汤圆']

    def make_cake(self):
        print(f"Master使用：【{self.kongfu}】制作早餐")

class School():
    def __init__(self):
        self.kongfu = ['机器汤圆']

    def make_cake(self):
        print(f"School使用【{self.kongfu}】制作商品")

class Person(Master,School):
    def __init__(self):
        self.kongfu = ['私人定制汤圆']

    def make_cake(self):
        print(f"我自己制作：【{self.kongfu}】")

person = Person()
print(person.kongfu)
person.make_cake()